function plotData(time,data,name,xlab,isSubplot)
m = size(data,1);
if nargin < 5
    n = length(name);
    if length(name) > 1 && n == m
        isSubplot = 1;
    else
        isSubplot = 0;
    end
end

if nargin < 4
    xlab = 'sec'
end

if strcmp(xlab,'min')
    time = time/60;
end
if strcmp(xlab,'hour')
    time = time/60/60;
end
%figure;
if isSubplot
    for i=1:m
        subplot(m,1,i);
        plot(time,data(i,:))
        title(name(i))
        xlabel(xlab)
        ylabel('\muV')
    end
else
    plot(time,data)
    title(name)
    xlabel(xlab)
    ylabel('\muV')
end
end